﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MixScriptWeb.control;
using MixScriptWeb.Share;
using MixScript.BLL;


namespace MixScriptWeb.Accounting
{
    public partial class fPeriod : cCommonWeb2, IMIxCommon //System.Web.UI.Page
    {

        private static DataTable dt;
        private static SortDirection sd;
        private static cReferences oReff;


        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public bool isvalid() { return true; }
        private void LoadData()
        {


        }
        protected void gvMaster_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {

                if (gvMaster.SelectedIndex > -1)
                {



                }
            }
            catch (Exception ex)
            {

                //ShowStatusBar(ex.Message);
            }
        }

        protected void gvMaster_Sorting(object sender, GridViewSortEventArgs e)
        {
            if (sd == SortDirection.Ascending)
            {
                sd = SortDirection.Descending;
            }
            else
            {
                sd = SortDirection.Ascending;
            }

            DataView dataView = new DataView(dt);
            dataView.Sort = e.SortExpression + " " + ShortDirection(sd);

            bindGridview(gvMaster, dataView);
        }

        protected void gvMaster_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {

            gvMaster.PageIndex = e.NewPageIndex;
            //gvMaster.DataBind();
            bindGridview(gvMaster, dt);

        }
    }
}